import {genSetIconsUnByCategories} from './gen-set-icons-un-by-categories.ts'

/**
 * 根据未分类的图标名称列表和按分类排序的图标名称列表生成包含所有图标的图标名称列表
 *
 * @param {Record<string, string[]>} categories 按分类排序的图标名称列表
 * @param {string[]} uncategorized 未分类的图标名称列表
 * @returns {string[]} 包含所有图标的图标名称列表
 */
export const genSetIconsAll = (categories: Record<string, string[]> = {}, uncategorized: string[] = []): string[] => {
  return [
    ...(
      new Set([
        ...genSetIconsUnByCategories(categories),
        ...uncategorized
      ])
    )
  ]
}

export type GenSetIconsAllType = typeof genSetIconsAll
